<?php if ($this->pageCount): ?>

<div class="pagination">
<ul>

<!-- Previous page link -->

<?php if (isset($this->previous)): ?>
<li>
   <a href="<?php echo $this->url($this->requestParams + array('controller'=>'index', 'action'=>'recordlist', 'page'=>$this->previous)); ?>"><<</a> 
</li>

<?php else: ?>
<li class="disabled">
   <span class="disabled"><<</span> 
</li>
<?php endif; ?>

<!-- Numbered page links -->

<?php foreach ($this->pagesInRange as $page): ?>

  <?php if ($page != $this->current): ?>
<li>
     <a href="<?php echo $this->url($this->requestParams + array('controller'=>'index', 'action'=>'recordlist', 'page'=>$page)); ?>"><?= $page; ?></a>
</li>

  <?php else: ?>
<li class="disabled">
    <span><?= $page; ?></span> 
</li>
  <?php endif; ?>

<?php endforeach; ?>

<!-- Next page link -->

<?php if (isset($this->next)): ?>
<li>
   <a href="<?php echo $this->url($this->requestParams + array('controller'=>'index', 'action'=>'recordlist', 'page'=>$this->next)); ?>">>></a>
</li>

<?php else: ?>
<li class="disabled">
   <span class="disabled">>></span>
</li>
<?php endif; ?>

</ul>
</div>

<?php endif; ?>
